package com.mornstar.econvent.auth.support;

import com.mornstar.common.utils.DigestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.crypto.password.PasswordEncoder;

import java.nio.charset.StandardCharsets;
import java.util.List;

/**
 * 自定义密码加密
 *
 * @author xiekun
 */
@Slf4j
public class EcoPasswordEncoder implements PasswordEncoder {

	@Override
	public String encode(CharSequence rawPassword) {
		return DigestUtil.hex((String) rawPassword);
	}

	@Override
	public boolean matches(CharSequence rawPassword, String encodedPassword) {
		return false ;
	}
}
